
<html>
    <head>
        <title>TODO supply a title</title>
        <script src="jquery-1.11.0.js" type="text/javascript"></script>
        
        <script type="text/javascript">
                $(document).ready(function (){
                    $('#load-data').click(function (){
                        $('#block-data').load('a.html');
                    });
                    
                    $('#load-json').click(function (){
                        $.getJSON('b.json',function (data){
                          // xu ly phan tich du lieu trong bien 'data'  
                          $.each(data,function (entryIndex,entry){
                              var html = "<div>";
                              html += "<div>" + entry = ['ten'] + "</div>";
                              html += "<div>" + entry = ['gia'] + "</div>";
                              html += "</div>";
                              // Dua du lieu vao khoi 'Block-data'
                              $('#block-data').append(html);
                          });
                        });
                    });
                });
        </script>
    </head>
    <body>
        <div id="block-data"></div>
        <input type="button" id="load-data" value="Load a.html"/>
        <input type="button" id="load-json" value="Load b.json"/>
    </body>
</html>
